package com.ruoyi.feedingAreaManagement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.feedingAreaManagement.mapper.EthicalReviewManagementMapper;
import com.ruoyi.feedingAreaManagement.domain.EthicalReviewManagement;
import com.ruoyi.feedingAreaManagement.service.IEthicalReviewManagementService;

/**
 * 伦理审查管理Service业务层处理
 * 
 * @author wj
 * @date 2025-08-11
 */
@Service
public class EthicalReviewManagementServiceImpl implements IEthicalReviewManagementService 
{
    @Autowired
    private EthicalReviewManagementMapper ethicalReviewManagementMapper;

    /**
     * 查询伦理审查管理
     * 
     * @param ethicalReviewManagementId 伦理审查管理主键
     * @return 伦理审查管理
     */
    @Override
    public EthicalReviewManagement selectEthicalReviewManagementByEthicalReviewManagementId(Long ethicalReviewManagementId)
    {
        return ethicalReviewManagementMapper.selectEthicalReviewManagementByEthicalReviewManagementId(ethicalReviewManagementId);
    }

    /**
     * 查询伦理审查管理列表
     * 
     * @param ethicalReviewManagement 伦理审查管理
     * @return 伦理审查管理
     */
    @Override
    public List<EthicalReviewManagement> selectEthicalReviewManagementList(EthicalReviewManagement ethicalReviewManagement)
    {
        return ethicalReviewManagementMapper.selectEthicalReviewManagementList(ethicalReviewManagement);
    }

    /**
     * 新增伦理审查管理
     * 
     * @param ethicalReviewManagement 伦理审查管理
     * @return 结果
     */
    @Override
    public int insertEthicalReviewManagement(EthicalReviewManagement ethicalReviewManagement)
    {
        ethicalReviewManagement.setCreateTime(DateUtils.getNowDate());
        ethicalReviewManagement.setDelFlag("0");
        return ethicalReviewManagementMapper.insertEthicalReviewManagement(ethicalReviewManagement);
    }

    /**
     * 修改伦理审查管理
     * 
     * @param ethicalReviewManagement 伦理审查管理
     * @return 结果
     */
    @Override
    public int updateEthicalReviewManagement(EthicalReviewManagement ethicalReviewManagement)
    {
        ethicalReviewManagement.setUpdateTime(DateUtils.getNowDate());
        return ethicalReviewManagementMapper.updateEthicalReviewManagement(ethicalReviewManagement);
    }

    /**
     * 批量删除伦理审查管理
     * 
     * @param ethicalReviewManagementIds 需要删除的伦理审查管理主键
     * @return 结果
     */
    @Override
    public int deleteEthicalReviewManagementByEthicalReviewManagementIds(Long[] ethicalReviewManagementIds)
    {
        return ethicalReviewManagementMapper.deleteEthicalReviewManagementByEthicalReviewManagementIds(ethicalReviewManagementIds);
    }

    /**
     * 删除伦理审查管理信息
     * 
     * @param ethicalReviewManagementId 伦理审查管理主键
     * @return 结果
     */
    @Override
    public int deleteEthicalReviewManagementByEthicalReviewManagementId(Long ethicalReviewManagementId)
    {
        return ethicalReviewManagementMapper.deleteEthicalReviewManagementByEthicalReviewManagementId(ethicalReviewManagementId);
    }
}
